# -*- coding: utf-8 -*-
conn=None
cursor=None
databaselogging=None
socketlogging=None
SPLITCHAR='`'
ENDCHAR='\x0a'
TABCHAR='\t'
COMMANDID_LENGTH=4
COMMANDTYPE_LENGTH=4
DEVICEID_LENGTH=6
DATETIME_LENGTH=14
TASKID_LENGTH=20
COMMAND_REGISTER='1001'
COMMAND_QUERYTASK='1002'
COMMAND_REQUESTTASK='1004'
COMMAND_COMMITTASK='1005'
COMMAND_COMMIT_FINISH_TASK='1006'
COMMAND_UPDATETASK='1007'
TASK_COLUMNS= '(\"id\", \"sender\", \"senderPhone\", \"senderCompany\", \"sendLocation\", \"sendTime\", \"receiver\", \"receiverPhone\", \"receiverCompany\", \"receiveLocation\", \"receiverTime\", \"paymentAux\", \"state\", \"isShortMessageNotify\", \"senderTerminalId\", \"companyId\", \"taskNo\", \"sendZip\", \"receiveZip\", \"senderEmail\", \"senderDepartment\", \"sendCity\", \"receiveCity\", \"posNo\", \"description\", \"articleNum\", \"paymentOption\")'
TASK_COLUMNS_FORMAT="%s,"+ "\'%s\',"*4 + "to_timestamp(\'%s\',\'YYYY-MM-DD HH24:MI:SS\')," + "\'%s\',"*4 + "to_timestamp(\'%s\',\'YYYY-MM-DD HH24:MI:SS\')," + "\'%s\',"*15 + "\'%s\'" 
SMS1_TEMPLATE='您好，%s委托%s为您递送运单号%s共%s件货物，我们将尽快运送，保留此信息以便投递时核验，多谢！'

STATUS_OK='00'
STATUS_ERROR_UNKOWN='FF'
STATUS_ERROR_TIMEOUT='FE'
STATUS_ERROR_SOCKET='FD'
